<?php 
session_start();

$url_sess_id = $_GET["id"];
$usr_sess_id = $_SESSION["user"]['sess_id'];

// Redirect back to login page if the user has not logged in or when he tries to access this page directly.
if(! isset($_SESSION["user"]) || (isset($_SESSION["user"]) && (strcmp($url_sess_id,$usr_sess_id) != 0)))
{
	header('location:login.php');
}

$common_params = "?id=".$url_sess_id;
?>
<html>
<head>
<head>
<title>sudeep.co.in | admin</title>
<link rel="stylesheet" href="css/style_1.css" type="text/css" />

<link rel="stylesheet" type="text/css" href="css/menu/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="css/menu/ddsmoothmenu-v.css" />

<script type="text/javascript" src="js/menu/menu-jquery.min.js"></script>
<script type="text/javascript" src="js/menu/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

ddsmoothmenu.init({
	mainmenuid: "smoothmenu2", //Menu DIV id
	orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
	//customtheme: ["#804000", "#482400"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>

</head>
<body>
<table class="header" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td width="1%">&nbsp;</td>
					<!--<td width="15%" class="top-menu-1"><a href="#">My account</a> | <a href="#">Settings</a> | <a href="#">Contact us</a></td>-->
					<td width="70%"><span class="quote_1">"There should be a better way to start a day than waking up every morning ..."</span></td>
					<td width="28%" class="top-menu-1"><font color="#e6e6e6">Welcome, <b><?php echo $_SESSION["user"]['fullname'];?></b></font> | <a href="account.php<?php echo $common_params;?>&mode=view">My account</a> | <a href="login_auth.php<?php echo $common_params;?>&act=logout">Logout</a></td>
					<td width="1%">&nbsp;</td>
				</tr>
			</table>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td width="3%" class="top-menu-2"><img src="images/logo.png" /></td>
					<td width="68%" class="top-menu-2"><!-- Admin--></td>
					<td width="30%" class="top-menu-2" align="center">
						<table class="top-menu-2_1_tbl" cellpadding="0" cellspacing="0" border="0" width="65%" align="right">
							<tr>
								<td class="top-menu-2_1">Logged in as: <?php echo "<b>".$_SESSION["user"]['id']."</b> [".$_SESSION["user"]['access_level']."]";?></td>
							</tr>
							<tr>
								<td class="top-menu-2_1">Last login: <?php echo $_SESSION["user"]['last_login'];?></td>
							</tr>							
						</table>
					</td>
					<td width="3%" class="top-menu-2">&nbsp;</td>
				</tr>
			</table>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td>&nbsp;</td>
 					<td width="100%" class="top-menu-3">
						<div id="smoothmenu1" class="ddsmoothmenu">
							<ul align="center">
								<li><a href="<?php echo "home.php$common_params";?>">Home</a></li>
								<li><a href="/dashboard.php<?php echo $common_params;?>">Dashboard</a></li>
								<li><a href="/mailbox.php<?php echo $common_params;?>">Messages</a></li>
								<li><a href="#">Tools</a>
									<ul>
										<li><a href="#">RSS Reader</a></li>
										<li><a href="/expenses.php<?php echo $common_params;?>">Expense Tracker</a></li>
										<li><a href="#">BookMarker</a></li>
										<li><a href="#">IMessage</a></li>
										<li><a href="#">eMail</a></li>
									</ul>
								</li>
								<li><a href="/site_stats.php<?php echo $common_params;?>">Site Statistics</a></li>
								<li><a href="http://www.sudeep.co.in/cpanel" target="_blank">Hosting CPanel</a></li>
								<li><a href="#">Administration</a>
									<ul>
										<li><a href="#">Manage Accounts</a></li>
										<li><a href="#">Thought for the Day</a></li>
										<li><a href="#">Site Contents</a></li>
										<li><a href="login_auth.php<?php echo $common_params."&";?>act=logout">Logout</a></li>
									</ul>
								</li>
							</ul>
						</div>
					</td>
					<td>&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table cellpadding="0" cellspacing="0" border="1" width="100%">
	<tr>
		<td>
			<table>
				<tr>
					<td class="page-name">My Account</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="1" width="85%" align="center">
				<tr>
					<td>
						<form name="frm_account" method="POST" action="">
						<table cellpadding="0" cellspacing="0" border="1" width="100%" align="center">
							<tr>
								<td align="right">Username</td>
								<td>&nbsp;:</td>
								<td width="20%"><input type="text" name="txt_account_username" size="30" value="" /></td>
							</tr>
							<tr>
								<td align="right">First Name</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_firstname" size="30" value="" /></td>
								<td align="right" width="10%">Last Name</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_firstname" size="30" value="" /></td>
							</tr>							
							<!--<tr>
								<td align="right">First Name</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_firstname" size="30" value="" /></td>
							</tr>
							<tr>
								<td align="right">Last Name</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_lastname" size="30" value="" /></td>
							</tr>-->													
							<tr>
								<td align="right">Email</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_email" size="30" value="" /></td>
							</tr>
							<tr>
								<td align="right">Access Level</td>
								<td>&nbsp;:</td>
								<td><input type="text" name="txt_account_accesslevel" size="30" value="" /></td>
							</tr>														
						</table>
						</form>						
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</body>
</html>
